package com.itheima.mapper;

import com.itheima.pojo.Dept;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;
@Mapper
public interface DeptMapper {

    @Select("select * from dept")
    List<Dept> queryDeptList();

    void add(Dept dept);
    @Delete( "delete from dept where id=#{id}")
    void delete(Integer id);
    @Select("select * from dept where id=#{id}")
    Dept findById(Integer id);
    void update(Dept dept);


}
